﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using MvcControls.Web.Infrastructure;

namespace MvcControls.Web.Helpers
{
    public static class ButtonHelper
    {
        public static MvcHtmlString Button(this HtmlHelper html, 
            string title, 
            string id,
            bool isSubmit = false)
        {
            return html.Partial(
                PathReader.GetHelperPathFor("Button.cshtml"),
                new ButtonHelperInfo 
                {
                    Title = title, 
                    Id = id,
                    IsSubmitButton = isSubmit
                });
        }
    }
}